@extends('content')

@section('content')
<div class="panel panel-success">
<div class="panel-heading">
	<h3 class="panel-title">修改人员信息</h3>
</div>
<div style="margin:0 auto;width:550px;">


	<div class="panel-body">
		<form class="form-horizontal" role="form" action="/users/update"  method="post">
				<input type="hidden" name="_token" value="{{ csrf_token() }}" />
				<input type="hidden" name="id" value="{{ $data->id }}" />
			<div class="form-group">
				<label for="firstname" class="col-sm-2 control-label">用户名</label>
				<div class="col-sm-10">
					<input type="text" class="form-control" id="firstname" name="name" value="{{ $data->name }}" readonly="readonly">
				</div>
			</div>
			<div class="form-group">
				<label for="lastname" class="col-sm-2 control-label">真实姓名</label>
				<div class="col-sm-10">
					<input type="text" class="form-control" id="lastname"
							 placeholder="请输入真实姓名" name="staffName" value="{{ $data->staffName }}">
				</div>
			</div>
			<div class="form-group">
				<label for="lastname" class="col-sm-2 control-label">角色权限</label>
				<div class="col-sm-10">
						<select class="form-control" name="role_id">
							@foreach($roles as $key)
 				      <option value="{{ $key->id }}">{{ $key->position }}</option>
 							@endforeach
	    			</select>
				</div>
			</div>
			<div class="form-group">
				<label for="lastname" class="col-sm-2 control-label">邮箱地址</label>
				<div class="col-sm-10">
					<input type="text" class="form-control" id="lastname"
							 placeholder="请输入邮箱地址" name="email" value="{{ $data->email }}">
				</div>
			</div>
			<div class="form-group">
				<label for="lastname" class="col-sm-2 control-label">排序位置</label>
				<div class="col-sm-10">
					<input type="text" class="form-control" id="lastname"
							 placeholder="请输入排序数字" name="orderId" value="{{ $data->orderId }}">
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<button type="submit" class="btn btn-success">提交</button>
					<button type="button" class="btn btn-warning" onclick ="window.history.go(-1)">返回</button>
				</div>
			</div>
		</form>
	</div>
</div>

</div>
@stop
